FROM gallop-jdk:1.0.0

ARG SOFTWARE_BASE_URL

COPY repositories /root/.sbt/repositories

RUN mkdir /app && cd /app \
    && wget -O sbt-1.5.8.tar.gz $SOFTWARE_BASE_URL/sbt-1.5.8.tar.gz \
    && tar -xzf sbt-1.5.8.tar.gz \
    && mv sbt-1.5.8 /opt/sbt-1.5.8 \
    && ln -s /opt/sbt-1.5.8 /opt/sbt \
    && cd /  && rm -rf /app
   
ENV SBT_HOME /opt/sbt
ENV PATH $SBT_HOME/bin:$PATH


## Try to download something...
RUN mkdir /app && cd /app \
    && sbt --debug update \
	&& cd / && rm -rf /app 

